﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="Carroit.Web.admin.index"  Debug="true" %>
<%@ Import Namespace="System" %>
<%@ Import Namespace="System.Collections" %>
<%@ Import Namespace="System.Collections.Generic" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Web" %>
<%@ Import Namespace="System.Web.UI" %>
<%@ Import Namespace="System.Web.UI.WebControls" %>

<!DOCTYPE html>

<%="<!--[if IE 8]> <html class=\"ie8 no-js\"> <![endif]-->"%>
<%="<!--[if IE 9]> <html class=\"ie9 no-js\"> <![endif]-->"%>
<%="<!--[if !IE]><!-->"%>
<html>
<%="<!--<![endif]-->"%>
<!-- BEGIN HEAD -->

<head>
    <meta charset="utf-8" />
    <title><%=Evan.Common.CommFun.GetAppSetting("AdminTitle") %> - 后台管理系统</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1" name="viewport" />
    <!-- #include file="include/com_res_css.inc" -->
</head>
<!-- END HEAD -->

<body class="page-header-fixed page-sidebar-closed-hide-logo page-content-white">
    <!-- BEGIN HEADER -->

    <!-- #include file="include/top_bar.inc" -->

    <!-- END HEADER -->
    <!-- BEGIN HEADER & CONTENT DIVIDER -->
    <div class="clearfix"></div>
    <!-- END HEADER & CONTENT DIVIDER -->
    <!-- BEGIN CONTAINER -->
    <div class="page-container">
        <!-- BEGIN SIDEBAR -->

        <!-- #include file="include/left_menu.inc" -->

        <!-- END SIDEBAR -->
        <!-- BEGIN CONTENT -->
        <div class="page-content-wrapper">
            <!-- BEGIN CONTENT BODY -->
            <div class="page-content">

                <!-- BEGIN PAGE HEADER-->
                <!-- BEGIN THEME PANEL -->

                <!-- END THEME PANEL -->

                <!-- BEGIN PAGE TITLE-->
                
                <h3 class="page-title">管理面板
                    <small>主页</small>
                </h3>
                
                <%--<a href="/modulelayout/homelayout.aspx" target="_blank">管理首页</a>--%>

                <%--<% if (Request.Url.Host.EndsWith("uoeee.com", StringComparison.OrdinalIgnoreCase) && GlobalConfig.Dev == 1) { %>--%>
                <% //if (GlobalConfigModel.Dev) { %>
                <% if (Evan.Common.CommFun.GetAppSetting("DevMode") == "1")  { %>
                <div class="row devmodealert">
                    <div class="col-lg-12">
                        <div class="alert alert-danger"><strong> 系统检测到开发者模式已开启 , 请及时关闭 ! &nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:;" data-mt="dev" class="closemode font-red ">点击立即关闭</a></strong></div>
                    </div>
                </div>
                <% } %>
                <% if (GlobalConfigModel.IsModuleSystem) { %>
                <div class="row modulemodealert">
                    <div class="col-lg-12">
                        <div class="alert alert-danger"><strong> 系统检测到当前模式为模块开发模式 , 请及时关闭 ! &nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:;" data-mt="module" class="closemode font-red ">点击立即关闭</a></strong></div>
                    </div>
                </div>
                <% } %>
                <% if (GlobalConfigModel.IsModuleSystem || Request.Url.Host.EndsWith("kaola.ws", StringComparison.OrdinalIgnoreCase) || Request.Url.Host.ToLower() == "localhost") { %>
                <div class="row">
                    <div class="col-lg-12">
                            <div class="portlet light bordered clearfix">
                                <div class="col-lg-1"><h5><a class="btn btn-primary" href="Page_Template/List.aspx?t=Component">组件管理</a></h5></div>
                                <div class="col-lg-1"><h5><a class="btn btn-primary" href="Page_Template/List.aspx?t=Template">模板管理</a></h5></div>
                                <div class="col-lg-1"><h5><a class="btn btn-primary" href="Page_Channel/List.aspx?t=Channel" >栏目管理</a></h5></div>
                            </div>
                        </div>
                </div>
                <% } %>
                <div class="row">
                    <div class="col-lg-12">
                            <div class="portlet light bordered clearfix" style="padding-bottom:12px;">
                                <div class="portlet-title">
                                    <div class="caption"><span class="caption-subject ">登录信息</span></div>
                                </div>
                                <div class="portlet-body">
                                    <div class="col-lg-4"><h5>本次登录IP：<%=Evan.Common.IPHelper.GetHostAddress() %></h5></div>
                                    <div class="col-lg-4"><h5>上次登录IP：<%=Evan.Member.Administrator.GetAdminInfoFromCache()["LastLoginIP"] %></h5></div>
                                    <div class="col-lg-4"><h5>上次登录时间：<%=Convert.ToDateTime(Evan.Member.Administrator.GetAdminInfoFromCache()["LastLoginTime"]).ToString("yyyy-MM-dd HH:mm:ss") %></h5></div>
                                </div>
                            </div>
                        </div>
                </div>


                <div class="row">
                    <div class="col-lg-12">
                            <div class="portlet light bordered clearfix">
                                <div class="portlet-title">
                                    <div class="caption"><span class="caption-subject ">服务器信息</span></div>
                                </div>
                                <div class="portlet-body">
                                    <div class="col-lg-4"><h5>主站域名：<%=Request.ServerVariables["SERVER_NAME"].ToString() %></h5></div>
                                    <div class="col-lg-4"><h5>网站管理目录：<%=SiteConfig.WebAdminPath %></h5></div>
                                    <div class="col-lg-4"><h5>附件上传目录：uploads</h5></div>
                                    <div class="col-lg-4"><h5>服务器名称：<%=Server.MachineName%></h5></div>
                                    <div class="col-lg-4"><h5>服务器IP：<%=Request.ServerVariables["LOCAL_ADDR"] %></h5></div>
                                    <div class="col-lg-4"><h5>NET框架版本：<%=Environment.Version.ToString()%></h5></div>
                                    <div class="col-lg-4"><h5>操作系统：<%=Environment.OSVersion.ToString()%></h5></div>
                                    <div class="col-lg-4"><h5>运行环境：<%=Request.ServerVariables["SERVER_SOFTWARE"]%></h5></div>
                                    <div class="col-lg-4"><h5>服务器端口：<%=Request.ServerVariables["SERVER_PORT"]%></h5></div>
                                    <div class="col-lg-4"><h5>目录物理路径：<%=Request.ServerVariables["APPL_PHYSICAL_PATH"]%></h5></div>
                                    <div class="col-lg-4"><h5>服务器时间：<%= DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") %></h5></div>

                                    <%if (Request.ServerVariables["SERVER_SOFTWARE"].ToLower().Contains("iis")) {%> 
                                    <div class="col-lg-4"><h5>服务器稳定运行：<%= ((Environment.TickCount / 0x3e8) / 60).ToString() + "分钟" %></h5></div>
                                    <div class="col-lg-4"><h5>主程序版本：<%= System.Diagnostics.FileVersionInfo.GetVersionInfo(Request.ServerVariables["APPL_PHYSICAL_PATH"]+"bin\\Web.dll").FileVersion %></h5></div>
                                    <div class="col-lg-4"><h5>核心库版本：<%= System.Diagnostics.FileVersionInfo.GetVersionInfo(Request.ServerVariables["APPL_PHYSICAL_PATH"]+"bin\\Evan.dll").FileVersion %></h5></div>
                                    <% } %>

                                  
                                </div>
                            </div>
                        </div>
                </div>
                

                <% if (Request.Url.Host.ToLower() == "localhost" || Request.Url.Host.EndsWith("kaola.ws",StringComparison.OrdinalIgnoreCase)) { %>
                <div class="row">
                    <div class="col-lg-12">
                            <div class="portlet light bordered clearfix">
                                <div class="col-lg-2"><h5><a class="btn btn-primary createSiteMap"  data-weburl="<%=SiteConfig.WebUrl %>" data-operat="生成中..." data-text="生成 SiteMap">生成 SiteMap</a></h5></div>
                                <% if (SiteConfig.WebMode == 2) { %>
                                <div class="col-lg-2"><h5><a class="btn btn-primary" href="/admin/Page_System/CreateStaticPages.aspx">生成静态页</a></h5></div>
                                <% } %>
                            </div>
                            <%--WebMode--%>
                        </div>
                </div>
                <%} %>
                <!-- END PAGE TITLE-->
                <!-- END PAGE HEADER-->

            </div>
            <!-- END CONTENT BODY -->
        </div>
        <!-- END CONTENT -->

    </div>
    <!-- END CONTAINER -->
    <!-- #include file="include/footer.inc" -->
    <!-- #include file="include/com_res_js.inc" -->
</body>

</html>
